import { Input as AntdInput, Select as AntdSelect, InputNumber as AntdInputNumber } from "antd";
import ComInput from "@/pages/OrderModule/common/components/CommonInput";
import ComInputNumber from "@/pages/OrderModule/common/components/CommonInputNumber";
import { PrefixPlaceholder } from "./main";
import CustomBatchSuffixInput from "../BatchSuffixInput";

export const BatchSuffixInput = props => {
	return (
		<PrefixPlaceholder>
			<CustomBatchSuffixInput {...props} />
		</PrefixPlaceholder>
	);
};

export const PreInput = props => {
	return (
		<PrefixPlaceholder>
			<AntdInput {...props} />
		</PrefixPlaceholder>
	);
};
PreInput.Group = AntdInput.Group;
PreInput.Search = AntdInput.Search;
PreInput.TextArea = AntdInput.TextArea;
PreInput.Password = AntdInput.Password;
export const Input = PreInput;

export const PreSelect = props => {
	return (
		<PrefixPlaceholder>
			<AntdSelect {...props} />
		</PrefixPlaceholder>
	);
};
PreSelect.Option = AntdSelect.Option;
PreSelect.OptGroup = AntdSelect.OptGroup;
export const Select = PreSelect;

export const PreInputNumber = props => {
	return (
		<PrefixPlaceholder required={props.required}>
			<AntdInputNumber {...props} />
		</PrefixPlaceholder>
	);
};
export const InputNumber = PreInputNumber;

export const CommonInput = props => {
	return (
		<PrefixPlaceholder>
			<ComInput {...props} />
		</PrefixPlaceholder>
	);
};
export const CommonInputNumber = props => {
	return (
		<PrefixPlaceholder style={{ width: "100%" }}>
			<ComInputNumber {...props} />
		</PrefixPlaceholder>
	);
};
